To resign, or leave, with one's credibility still intact.
Jane had a long spell as chairman, but bowed out after she had a child.